<template>
	<view>
		<mine-head :title="title"></mine-head>
		<!-- <view-head :Title="title" :isShowR="false" @saveBack="saveBack"></view-head> -->
		<view class="detail">
			<view class="" v-html="content">
				
			</view>	
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:'',
				content:'',
				page:{
					data:null
				}
			};
		},
		onLoad(options) {
			if(options.title){
				this.title = options.title
			}
			if(options.type){
				this.page.data = options.type
			}
		},
		onShow() {
			this.getData()
		},
		methods:{
			getData(){
				let that = this
				uni.$_post({
					url: "get-health-view",
					that: that,
					params: that.page,
					success(res) {
						let data = res.data;
						if(res.code == 0){
							that.content = data.content
							
						}else{
							uni.showToast({
								title: res.msg,
								duration: 1500,
								icon:'error'
							});
						}
					},
					fail(err) {
						uni.showToast({
							title: err.msg,
							duration: 1000,
							icon:'error'
						});	
					},
				});
			},
		},
	}
</script>

<style lang="scss" scoped>
.detail{
	padding: 40rpx 30rpx;
}
</style>
